package cc.uncarbon.module.sys.model.response;

import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import cc.uncarbon.framework.core.enums.YesOrNoEnum;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;


/**
 * 数据表注释 BO
 */
@Accessors(chain = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class VbenMenuBO implements Serializable {

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "创建时刻")
    @DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时刻")
    @DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    private LocalDateTime updatedAt;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "标题名称")
    private String title;

    @Schema(description = "重定向路由地址")
    private String redirect;

    @Schema(description = "上级菜单ID(根节点设置为0)")
    private Long parentId;

    @Schema(description = "权限标识")
    private String authCode;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "激活图标（菜单）")
    private String activeIcon;

    @Schema(description = "当前路由在菜单中不展现")
    private Integer hideInMenu;

    @Schema(description = "当前路由在标签页不展现")
    private Integer hideinTab;

    @Schema(description = "忽略权限，直接可以访问@default false")
    private Integer ignoreAccess;

    @Schema(description = "开启KeepAlive缓存")
    private Integer keepAlive;

    @Schema(description = "外链-跳转路径")
    private String link;

    @Schema(description = "在新窗口打开")
    private Integer openInNewWindow;

    @Schema(description = "用于路由->菜单排序")
    private Integer sort;

    @Schema(description = "类型")
    private String type;

    @Schema(description = "页面组件")
    private String component;

    @Schema(description = "状态(0=禁用 1=启用)")
    private EnabledStatusEnum status;

}
